<?php

/**
 * TemplateSetting form base class.
 *
 * @method TemplateSetting getObject() Returns the current form's model object
 *
 * @package    berta-s
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedInheritanceTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseTemplateSettingForm extends SettingForm
{
  protected function setupInheritance()
  {
    parent::setupInheritance();

    $this->widgetSchema   ['template_id'] = new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Template'), 'add_empty' => true));
    $this->validatorSchema['template_id'] = new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Template'), 'required' => false));

    $this->widgetSchema->setNameFormat('template_setting[%s]');
  }

  public function getModelName()
  {
    return 'TemplateSetting';
  }

}
